#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

struct Goods
{
	char name[10];
	int count;
	double price;
};
void my_scanf(struct Goods* is, int n)
{
	int i = 0;
	for (i = 0; i < n; i++)
	{
		scanf("%s %d %lf", (is + i)->name, &((is + i)->count), &((is + i)->price));
	}
}
void my_print(struct Goods* is, int n)
{
	int i = 0;
	for (i = 0; i < n; i++)
	{
		printf("%s %d %.1lf %.2lf", (is + i)->name, (is + i)->count, (is + i)->price, (is + i)->count * (is + i)->price);
		printf("\n");
	}
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	struct Goods is[100] = { 0 };
	my_scanf(&is, n);
	my_print(&is, n);
	return 0;
}